<template>
  <div class="home-container">
    <div class="header">
      <h1>MD2Card - Markdown转精美卡片工具</h1>
      <p class="subtitle">将您的Markdown内容转换为精美的分享卡片，支持多种风格</p>
    </div>
    <div class="action">
      <router-link to="/editor" class="start-button">开始创建</router-link>
    </div>
    <div class="features">
      <div class="feature-item">
        <div class="feature-icon">📝</div>
        <h3>Markdown编辑</h3>
        <p>使用Vditor提供强大的Markdown编辑体验</p>
      </div>
      <div class="feature-item">
        <div class="feature-icon">🎨</div>
        <h3>多种风格</h3>
        <p>支持多种预设卡片风格，满足不同场景需求</p>
      </div>
      <div class="feature-item">
        <div class="feature-icon">📏</div>
        <h3>自定义尺寸</h3>
        <p>支持自定义卡片尺寸和比例</p>
      </div>
      <div class="feature-item">
        <div class="feature-icon">✂️</div>
        <h3>自定义拆分</h3>
        <p>支持按三横线分隔符拆分</p>
      </div>
    </div>

    <div class="footer">
      <p>MD2Card - 让您的内容更精彩</p>
    </div>
  </div>
</template>

<script setup lang="ts">
// Home页面不需要特殊逻辑
</script>

<style scoped>
.home-container {
  max-width: 98%;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.header {
  margin-bottom: 3rem;
}

.subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-top: 0.5rem;
}

.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.feature-item {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  padding: 1.5rem;
  border-radius: 8px;
  background-color: #f9f9f9;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-item h3 {
  margin-bottom: 0.5rem;
  color: #333;
}

.feature-item p {
  color: #666;
}

.action {
  margin: 2rem 0;
}

.start-button {
  display: inline-block;
  padding: 0.8rem 2rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  background-color: #646cff;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s;
}

.start-button:hover {
  background-color: #535bf2;
}

.footer {
  margin-top: 3rem;
  color: #888;
  font-size: 0.9rem;
}

@media (prefers-color-scheme: dark) {
  .feature-item {
    background-color: #2a2a2a;
  }

  .feature-item h3 {
    color: #e0e0e0;
  }

  .feature-item p,
  .subtitle {
    color: #aaa;
  }
}
</style>